package com.itheima.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.PermissionDao;
import com.itheima.pojo.Permission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author likun
 * @version V1.0
 * @date 2020/3/10 12:44
 */
@Service(interfaceClass = LkPermissionService.class)
@Transactional
public class LkPermissionServiceImpl implements LkPermissionService  {
    @Autowired
    private PermissionDao permissionDao;
    @Override
    public List<Permission> findAllPermission() {
        return permissionDao.findAllPermission();
    }

    @Override
    public List<Integer> findPermissionIds(Integer id) {

        return permissionDao.findPermissionIdsByRoleId(id);
    }
}
